package com.runfast.waimai.web.controller;

import com.runfast.common.utils.TokenUtil;
import com.runfast.common.web.entity.Result;
import com.runfast.waimai.dao.model.RunfastEnshrine;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商家活动接口
 */
@RestController("userWmEnshrineController")
@RequestMapping(value= "/api/user/wm/enshrine", headers = "token")
public class EnshrineController {

    /**
     * 获取用户收藏列表
     * @param token
     * @return
     */
    @PostMapping("/list")
    public Result<List<RunfastEnshrine>> list(@RequestHeader String token) {
        Integer userId = TokenUtil.getUserId(token);


        return Result.ok("");
    }

    /**
     * 收藏商家
     * @param businessId 商家id
     * @param token
     * @return
     */
    @PostMapping("/add")
    public Result add(@RequestParam int businessId, @RequestHeader String token) {
        Integer userId = TokenUtil.getUserId(token);


        return Result.ok("");
    }

}
